
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App.vue';
import router from './router';

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


import Multiplex from './components/Multiplex'   //组件

  
import '../static/css/common.css'     //  公共样式库


Vue.use(ElementUI);

//获取url参数
function getQueryString(name) { 
  var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
  var r = window.location.search.substr(1).match(reg); 
  if (r != null) return unescape(r[2]); return null; 
}

// window.localStorage.clear();

var userid = getQueryString('id');

// console.log(userid);
if(userid){
  window.localStorage.Authorization = userid;
}


Vue.config.productionTip = false

Vue.use(Multiplex);

//三种请求方式
import {ApiPost, ApiGet, ApiPut} from './config/userconf'
Vue.prototype.$httpPost = ApiPost;
Vue.prototype.$httpGet = ApiGet;
Vue.prototype.$httpPut = ApiPut;

/* eslint-disable no-new */
new Vue({
  el: '#apps',
  router,
  components: { App },
  template: '<App/>'
})



